package cn.felord.reactor.flux.factory;

/**
 * @author Dax
 * @since 22:02  2019-08-10
 */
public class CustomTask implements Task {
    private SomeService someService;
    private String cronExpression;

    public CustomTask(SomeService someService) {
        this.someService = someService;
    }

    @Override
    public void execute() {
        //do something
        someService.doTask();
    }

    @Override
    public void setCron(String cronExpression) {
        this.cronExpression = cronExpression;
    }

    @Override
    public String getCron() {
        return cronExpression;
    }
}
